<?php
/**
 * @copyright 2011
 * @version $Id$
 * @access public
 * @author Oriotiori

 */
class Default_Form_reclutamientoForm extends Zend_Form
{
    
    public function __construct($data = null)
    {
        parent::__construct($data);

        $s_Sass = new Zend_Session_Namespace('s_Sass');

        $this->setMethod('post')
            ->setAttribs(array('class' => 'none'))
            ->setName('reclutamiento');


////////////////////////Name////////////////////////

        $name = new Zend_Form_Element_Text('Full-name');
        $name
            ->setLabel('Nombre Completo')
            ->setOptions(array('requiredSuffix' => ' *'))
            ->setRequired(true)
            ->setAttribs(array(true,'maxlength'  => 70))
            ->addValidator('stringLength', false, array(4, 70))
                ->addErrorMessage('Nombre de usuario no válido.');

////////////////////////Email_Friend////////////////////////

        $email = new Zend_Form_Element_Text('Email');
        $email
            ->setLabel('Email')
            ->setOptions(array('requiredSuffix' => ' *'))
            ->setRequired(true)
            ->setAttribs(array(true,'maxlength'  => 70))
            ->addValidator('NotEmpty', true)
            ->addErrorMessage('Direccion de email no valida');

////////////////////////Name_Friend////////////////////////

        $telefono = new Zend_Form_Element_Text('Telefono');
        $telefono
            ->setLabel('Telefono')
            ->setAttribs(array(true,'maxlength'  => 20))
            ->setOptions(array('requiredSuffix' => ' *'))
            ->setRequired(true)
            ->addValidator('stringLength', false, array(5, 20))
            ->addErrorMessage('Este campo es requerido, telefono no valido')
            ->addValidator('Alnum', false, array('allowWhiteSpace' => true));


////////////////////////Send////////////////////////

        $enviar = new Zend_Form_Element_Submit('Enviar');
        $enviar
            ->setLabel('Aceptar')
            ->setAttribs(array('class' => 'boton'));


////////////////////////Cancel////////////////////////

        $cancelar = new Zend_Form_Element_Reset('Cancelar');
        $cancelar
            ->setLabel('Cancelar')
            ->setAttribs(array('class' => 'boton'));

////////////////////////CP_Friend////////////////////////

        $celular = new Zend_Form_Element_Text('Celular');
        $celular
            ->setLabel('Celular')
            ->setRequired(true)
            ->setAttribs(array(true,'maxlength'  => 20))
            ->addValidator('stringLength', false, array(10, 20))
            ->setOptions(array('requiredSuffix' => ' *'))
            ->addErrorMessage('Este campo es requerido, telefono celular no válido')
            ->addValidator('Alnum', false, array('allowWhiteSpace' => true));
    
        $ciudad = new Zend_Form_Element_Select('Ciudad');
        $ciudad
            
            ->addMultiOptions(
                array(('0') => ('Ciudad'),('Mexico') => ('Mexico'),('Izcalli') => ('Izcalli'))
            )
            ->setValue(0)
            ->addValidator('stringLength', false, array(2, 100))
            ->addErrorMessage('Debe seleccionar una ciudad válida');

        $estado = new Zend_Form_Element_Select('Estado');
        $estado

            ->addMultiOptions(
                array(('0') => ('Estado'),('Mexico') => ('Mexico'),('Izcalli') => ('Izcalli'))
            )
            ->setValue(0)
            ->addValidator('stringLength', false, array(2, 100))
            ->addErrorMessage('Debe seleccionar un Estado válido');

        $horario = new Zend_Form_Element_Select('Horario');
        $horario

            ->addMultiOptions(
                array(('0') => ('Horario de llamadas'),('am') => ('Am'),('pm') => ('Pm'))
            )
            ->setValue(0)
            ->addValidator('stringLength', false, array(2, 100))
            ->addErrorMessage('Debe seleccionar un horario válido');

        $this->addElements(
            array(
                    $name, $email, $estado, $ciudad,
                    $telefono, $celular, $horario, $cancelar,
                    $enviar
                )
        );
        
        $this->setElementFilters(array('StringTrim'));
        $this->setAction(
                    Zend_Controller_Front::getInstance()->getBaseUrl().DIAG_PATH.'reclutamiento/'
        );


    }
	
}